Component({
  data: {
    selected: 0,
    color: "#333333",
    selectedColor: "#0fc9b7",
    backgroundColor: "#1d1d1d", 
    fontWeight: "normal",
    selectedFontWeight:"bold",
    list: [      
      {
      "iconPath":"/images/iconHome.png",
      "selectedIconPath":"/images/iconHomeChosen.png",
      "pagePath": "/pages/home/home", 
      "text": "首页"
      }, 
      {
        "iconPath":"/images/iconActivity.png",
        "selectedIconPath":"/images/iconActivityChosen.png",
        "pagePath": "/pages/activity/activity",
        "text": "监测"
        }, 
      {
        "iconPath":"/images/iconReport.png",
        "selectedIconPath":"/images/iconReportChosen.png",
        "pagePath": "/pages/report/report",
        "text": "报告"
        },
      {
        "iconPath":"/images/iconMine.png",
        "selectedIconPath":"/images/iconMineChosen.png",
        "pagePath": "/pages/mine/mine",
        "text": "我的"
        }
      ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url:url})
      this.setData({
        selected: data.index
      })
    }
  }
})